#!/bin/bash


title=cmp_qps_data_load
title1=2K_rows
data1=results/data_2000_apache_app_data_page.csv
title2=1K_rows
data2=results/reply_time_apache_app_data.csv
output_file=plots/${title}.png
echo "plotting $title"
gnuplot <<EOF
# set output
set terminal png
set output "$output_file"
# graph title
set title "$title"
# nicer aspect ratio for image size
set size 1,0.7
# y-axis grid
set grid y
# x-axis label
set xlabel "load"
# y-axis label
set ylabel "qps"
plot "$data1" using 1:(1000/\$2) smooth sbezier with lines title "$title1", "$data2" using 1:(1000/\$2) smooth sbezier with lines title "$title2"
EOF
